package com.foreknow.elm.dao;

import com.foreknow.elm.po.Deliveryaddress;

import java.util.List;

public interface DeliveryAddressDao {
    /**
     * DeliveryAddressController/listDeliveryAddressByUserId
     * 参数：userId
     * 返回值：Deliveryaddress数组
     * 功能：根据用户编号查询所属送货地址
     */
    public List<Deliveryaddress> listDeliveryAddressByUserId(String userId)  throws Exception;

    /**
     * DeliveryAddressController/getDeliveryAddressById
     * 参数：daId
     * 返回值：deliveryAddress对象
     * 功能：根据送货地址编号查询送货地址
     */
    public  List<Deliveryaddress> getDeliveryAddressById(Integer daId)  throws Exception;

    /**
     * DeliveryAddressController/saveDeliveryAddress
     * 参数：contactName、contactSex、contactTel、address、userId
     * 返回值：int（影响的行数）
     * 功能：向送货地址表中添加一条记录
     */
    public int saveDeliveryAddress(String contactName,Integer contactSex,String contactTel,String address,String userId)  throws Exception;



    /**
     * DeliveryAddressController/updateDeliveryAddress
     * 参数：daId、contactName、contactSex、contactTel、address、userId
     * 返回值：int（影响的行数）
     * 功能：根据送货地址编号更新送货地址信息
     */
    public  int updateDeliveryAddress(Integer daId ,String contactName,Integer contactSex,String contactTel,String address,String userId) throws Exception;



    /**
     *DeliveryAddressController/removeDeliveryAddress
     * 参数：daId
     * 返回值：int（影响的行数）
     * 功能：根据送货地址编号删除一条记录
     */

    public int removeDeliveryAddress( Integer daId);






}
